package com.wn.course.repository.module

import com.wn.course.view.CourseAdapter
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityComponent
import dagger.hilt.android.scopes.ActivityScoped

/**
 * @Author: wn
 * @Date: 2023/10/20 15:43
 * @Description: 提供 FooterAdapter retry 函数
 */
@Module
@InstallIn(ActivityComponent::class)
object FooterAdapterModule {
  @ActivityScoped
  @Provides
  fun provideCourseRetryFun(adapter: CourseAdapter): () -> String =
    {
      adapter.retry()
      "At Course"
    }
}